package com.dragon.mmochat.model.object;

import java.io.Serializable;
import java.util.Date;

import com.dragon.mmochat.model.enumType.MmochatPropType;

//道具效果
public class MmochatPropEffect implements Serializable,
		Comparable<MmochatPropEffect> {
	private static final long serialVersionUID = 1948399618169734915L;
	private MmochatPropType propType;
	private long startTime = System.currentTimeMillis();
	private long restAmount = 0; // 总时间(ms),剩余次数

	public MmochatPropType getPropType() {
		return propType;
	}

	public void setPropType(MmochatPropType propType) {
		this.propType = propType;
	}

	public long getStartTime() {
		return startTime;
	}

	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}

	public long getRestAmount() {
		return restAmount;
	}

	public void setRestAmount(long restAmount) {
		this.restAmount = restAmount;
	}

	public void addAmount(long amount) {
		restAmount += amount;
	}

	@Override
	public int compareTo(MmochatPropEffect other) {
		return propType.getEffectKey() - other.getPropType().getEffectKey();
	}

}
